1. Field of the Invention
The present invention relates to a microcomputer, and more particularly, to a microcomputer having a clock control circuit and an initializing method thereof.
2. Description of the Related Art
A single-chip microcomputer is formed by integrating, on a single chip, a CPU (Central Processing Unit), a memory, and various peripheral functional macros. For example, a request for initializing a peripheral function includes a request for determining whether or not the pull-up operation of an input/output port is valid and a request for determining whether or not a watchdog timer operates as a default upon starting the microcomputer. In the single-chip microcomputer, the request is varied depending on users. The fine adjustment after manufacturing includes the correction of offset voltage for the accuracy improvement of an A/D converter macro and the control for writing operation and a turned-off voltage for stress suppression due to a high electric-field of a flash ROM (Read-Only Memory). The fine adjustment is advantageous to improve the characteristics and the yield in the single-chip microcomputer.
In response to the above-mentioned requests, various methods are widely used, e.g., the trimming for adjusting the characteristics by using the fuse disconnection and the mask option for initializing the function by changing a mask pattern and the arrangement of a dedicated terminal for selecting the function and characteristic in accordance with an external voltage level of an input terminal. However, there are problems of the increase in number of kinds of products in the mask option, of the complication manufacturing processing in the trimming, and the increase in number of terminals in the dedicated terminal device.
Japanese Unexamined Patent Application Publication No. 2001-092803 (Patent Document 1) discloses a conventional art to solve the above-described problems in the microcomputer including the non-volatile memory. FIG. 12 is a block diagram showing the structure of the microcomputer according to the conventional art.
A microcomputer 400 according to the conventional art comprises: a flash ROM 41 which stores switch data for switching the wiring connection in a functional macro; a register 42 which inputs and holds the stored data; a functional macro 43 for receiving an output from the register 42; and a control circuit 44 which controls the flash ROM 41 and the register 42.
Upon starting the microcomputer 400, the control circuit 44 first issues a reading instruction to the flash ROM 41, simultaneously transmits an address signal and a write signal to the register 42, and transfers the data to the register 42 from the flash ROM 41. After transferring the data, the register 42 enters a continuous output-state. Thus, the switch data stored in the flash ROM 41 is supplied to the functional macro 43, and the wiring connection is switched so as to set the functional macro 43 to have a desired function. As mentioned above, according to the conventional art, the switch data prestored in the flash ROM 41 shifts to the register 42 upon starting the microcomputer, and the function of the functional macro 43 is selected by setting the switch in the functional macro. Therefore, various functions are realized only by overwriting the switch data stored in the flash ROM 41 without the mask option, the trimming, and the dedicated terminal.
Although not described in Japanese Unexamined Patent Application Publication No. 2001-092803 (Patent Document 1), a clock signal as a sync signal is necessary for sequentially transferring, to the register 42 from the flash ROM 41, a plurality pieces of switch data under the control of the control circuit 44. However, when the clock signal is generated in the chip using a crystal oscillating circuit and then is supplied to the microcomputer, or when an external clock signal externally supplied is phase-adjusted by a PLL (Phase Locked Loop) or DLL (Delay Locked Loop) and then is supplied to the microcomputer, the supply, in the microcomputer 400, of the stable clock signal after starting it needs a clock stabilizing time of several milliseconds (ms) or more. That is, according to the conventional art, after the microcomputer starts and the clock stabilizing time passes, and the preparation for reading the flash ROM starts. Further, after a predetermined reading preparing time, the transfer of the switch data starts from the flash ROM to the register. The determination of the microcomputer function needs to a waiting time which requires the completion of transfer from the flash ROM to the register and the setting of a switch in the functional macro in accordance with the switch data. Therefore, there is a problem that the microcomputer operating start is substantially delayed.